// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SYS_IMPORT_TEMPLATE
// * CreateDate    : 2014-11-12 15:57:53
// * Creater       : CodeSmith
// * LastChangeDate: 2014-11-12 15:57:53
// * LastChanger   : 2014-11-12 15:57:53
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
    [Serializable]
    public partial class SysImportTemplateEntity : EntityBase
    {
        public SysImportTemplateTable TableSchema
        {
            get
            {
                return SysImportTemplateTable.Current;
            }
        }

        public SysImportTemplateEntity()
        {

        }

        public SysImportTemplateEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
            this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
            this.ImportTemplate = (byte[])(CommonFunctions.ToObject(dr["IMPORT_TEMPLATE"]));
            this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
        }

        public SysImportTemplateEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
            this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
            this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
            this.FormName = Convert.ToString(CommonFunctions.ToObject(dr["FORM_NAME"]));
            this.ImportTemplate = (byte[])(CommonFunctions.ToObject(dr["IMPORT_TEMPLATE"]));
            this.Type = Convert.ToString(CommonFunctions.ToObject(dr["TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SysImportTemplateTable.Current;
            }
        }

        #region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(SysImportTemplateTable.C_ID)); }
            set { SetData(SysImportTemplateTable.C_ID, value); }
        }

        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SysImportTemplateTable.C_CREATED_BY)); }
            set { SetData(SysImportTemplateTable.C_CREATED_BY, value); }
        }

        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SysImportTemplateTable.C_CREATED_DATE)); }
            set { SetData(SysImportTemplateTable.C_CREATED_DATE, value); }
        }

        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(SysImportTemplateTable.C_UPDATED_BY)); }
            set { SetData(SysImportTemplateTable.C_UPDATED_BY, value); }
        }

        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(SysImportTemplateTable.C_UPDATED_DATE)); }
            set { SetData(SysImportTemplateTable.C_UPDATED_DATE, value); }
        }

        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(SysImportTemplateTable.C_IS_ACTIVE)); }
            set { SetData(SysImportTemplateTable.C_IS_ACTIVE, value); }
        }

        [DataMember]
        public string FormName
        {
            get { return Convert.ToString(GetData(SysImportTemplateTable.C_FORM_NAME)); }
            set { SetData(SysImportTemplateTable.C_FORM_NAME, value); }
        }

        [DataMember]
        public byte[] ImportTemplate
        {
            get { return (byte[])(GetData(SysImportTemplateTable.C_IMPORT_TEMPLATE)); }
            set { SetData(SysImportTemplateTable.C_IMPORT_TEMPLATE, value); }
        }

        [DataMember]
        public string Type
        {
            get { return Convert.ToString(GetData(SysImportTemplateTable.C_TYPE)); }
            set { SetData(SysImportTemplateTable.C_TYPE, value); }
        }

        #endregion
    }


}

